<!-- name是模板名 -->
<template name="list-goods">
	<view>
	   <view class="list-view">
	   	<view class="m-view" v-for="(item,index) in listGoods" :key="index" @click="navTo('../../pages/order/order?index='+index)">
	   		<image class="g-img" :src="item.goodImg" mode=""></image>
	   		<view class="m-title more-hidden2">
	   			{{item.goodTitle}}
	   		</view>
	   		<view class="j-view">
	   			{{item.goodPoints}} 积分
	   		</view>
	   	</view>
	   </view>
	</view>
</template>
<script>
export default {
	name: "list-goods",//模板名字，在调用页面当标签用
	props: {	//属性，在调用页面导入熟悉
		listGoods: {
			type: Array,//属性类型
		},
		
	},
	//组件生命周期
	created:function(e){
	
	},
	methods: {	
		//函数，可以直接出发函数和页面跳转
		navTo(url){
			uni.navigateTo({
				url
			});
		}
	}
}
</script>
<style>

.list-view{
		width: 100%;
		background-color: #FFFFFF;
		padding: 20upx;
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
	}
	.m-view{
		width: 346upx;
		height: 408upx;
		background:rgba(255,255,255,1);
		border-radius:8upx;
		border:1upx solid rgba(216,216,216,1);
		margin-bottom: 20upx;
	}
	.m-view:nth-child(odd){
		margin-right: 20upx;
	}
	.g-img{
		width: 342upx;
		height: 262upx;
		border-radius:8upx 8upx 0upx 0upx;
	}
	.m-title{
		padding: 10upx 10upx 0 10upx;
		font-size:24upx;
		font-weight:500;
		color:rgba(78,78,78,1);
		line-height:32upx;
	}
	.j-view{
		padding: 10upx;
		font-size:26upx;
		font-weight:500;
		color:rgba(244,72,86,1);
		line-height:36upx;
	}

</style>